<extend name="Public/base" />
<block name="body">
    <div class="main-title location">
        <h2>
        <i>当前位置：</i>扩展管理 - 钩子列表<a href="{:U('addHook')}">新增</a>
        </h2>
    </div>
    <div class="title_form">
        <div class="title_search">
            <form action="{:U('')}" method="get" class="form-search form-inline">
                <label for="">名称：</label>
                <input type="text" name="name" class="text-s" value="{:I('name')}">
                <button type="submit">搜索</button>

            </form>
        </div>
    </div>
    <div class="typecho-table-wrap">
        <?php
            $hook_types = C('HOOKS_TYPE');
        ?>
        <form action="{:U('delhook')}" method="post" id="del_form">
            <table id="del_table" class="table table-hover">
                <thead>
                <tr>
                    <th><input type="checkbox" name="checkAll"></th>
                    <th>名称</th>
                    <th>描述</th>
                    <th>类型</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <volist name="list" id="vo">
                    <tr>
                        <td><input type="checkbox" name="id[]" value="{$vo.id}" class="ids"></td>
                        <td>{$vo.name}</td>
                        <td>
                            <a href="javascript:;" class="editable" data-name="description" data-type="text" data-pk="{$vo.id}" data-url="{:U('ajaxUpdate')}">{$vo.description}</a>
                        </td>
                        <td>{$hook_types[$vo['type']]}</td>
                        <td><a href="{:U('edithook?id='.$vo['id'])}">编辑</a></td>
                    </tr>
                </volist>
                </tbody>
            </table>
        </form>
    </div>
    <div class="pagination pagination-right">
        <button class="pull-left" id="batch_del">删除</button>
        {$_page}
    </div>
</block>
